'''
Description: 
Version: 2.0
Autor: ruog__
Date: 2024-05-22 15:10:25
LastEditors: ruog__
LastEditTime: 2024-05-22 15:18:00
'''
import serial

# 设置串口参数
ser = serial.Serial('/dev/ttyAS5', baudrate=9600, timeout=1)

while True:
    # 读取一行数据
    line = ser.readline().decode().strip()
    
    # 判断是否包含 'lsh' 字符
    if 'GNRMC' in line:
        print(line)
        return line
